﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AdvancedCSharpFeatures
{
    public static class StringExtentions
    {
        public static string SubstringExtended(this string currentString, int index, int length)
        {
            StringBuilder substring = new StringBuilder();
            for (int charIndex = index; charIndex < index+length; charIndex++)
            {
                substring.Append(currentString[charIndex]);
            }
            return substring.ToString();
        }
    }
}
